<h1>Listing events</h1>

<table>
  <tr>
    <th>Term</th>
    <th>Type</th>
    <th>Event name</th>
    <th>Event type</th>
    <th>Location</th>
    <th>Start time</th>
    <th>Stop time</th>
    <th>Monday</th>
    <th>Tuesday</th>
    <th>Wednesday</th>
    <th>Thursday</th>
    <th>Friday</th>
    <th>Saturday</th>
    <th>Sunday</th>
    <th>Repeating</th>
    <th>Start date</th>
    <th>End date</th>
    <th>Finals group</th>
    <th>Ccn</th>
    <th>Course</th>
  </tr>

<% @events.each do |event| %>
  <tr>
    <td><%=h event.course.term.name %></td>
    <td><%=h event.type %></td>
    <td><%=h event.event_name %></td>
    <td><%=h event.event_type %></td>
    <td><%=h event.location %></td>
    <td><%=h event.start_time %></td>
    <td><%=h event.stop_time %></td>
    <td><%=h event.monday %></td>
    <td><%=h event.tuesday %></td>
    <td><%=h event.wednesday %></td>
    <td><%=h event.thursday %></td>
    <td><%=h event.friday %></td>
    <td><%=h event.saturday %></td>
    <td><%=h event.sunday %></td>
    <td><%=h event.repeating %></td>
    <td><%=h event.start_date %></td>
    <td><%=h event.end_date %></td>
    <td><%=h event.finals_group %></td>
    <td><%=h event.ccn %></td>
    <td><%=h event.course.title %></td>
    <td><%# link_to 'Show', event %></td>
    <td><%# link_to 'Edit', edit_event_path(event) %></td>
    <td><%# link_to 'Destroy', event, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New event', new_event_path %>